<template>
    <div id="banner" :style="style">
        <div>
            <h1>图论</h1>

            <h2>北京邮电大学图论课程网站</h2>

            <p>
                七桥起源 · 哥尼斯堡<br>
                Graph theory. bupt.
            </p>
        </div>
    </div>
</template>

<script type="text/babel">
    'use strict';

    module.exports = {
        props: ['width', 'bannerShow'],
        data: ()=>({
            img: 'img/banner.png'
        }),
        computed: {
            style: function () {
                return {
                    'background-image': 'url(' + this.img + ')',
                    'width': (this.bannerShow ? this.width : 0) + 'px'
                }
            }
        },
        methods: {
            tabClick: (tab)=> {
                this.tab = tab;
            }
        }
    }


</script>